Skip to content

Conversation

@Ecarrion
Copy link
Contributor

@Ecarrion Ecarrion commented Dec 3, 2022

Why

While testing the error state on the Products Card, I noticed that Xcode started to show some strange warnings about published variables being accessed from a background thread.

After a quick look, I noticed that the switchToErrorState() method is called from an async function.

This PR fixes that by annotating methods that update our published variables with the @MainActor attribute.


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@Ecarrion Ecarrion added the category: tracks Related to analytics, including Tracks Events. label Dec 3, 2022
@Ecarrion Ecarrion added this to the 11.6 milestone Dec 3, 2022
@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8306-ca9c6ad on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@rachelmcr rachelmcr self-assigned this Dec 5, 2022
Copy link
Contributor

@rachelmcr rachelmcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! I'd just noticed the warnings, too. 👍

@Ecarrion Ecarrion merged commit 026b088 into trunk Dec 5, 2022
@Ecarrion Ecarrion deleted the issue/fix-background-warnings branch December 5, 2022 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tracks Related to analytics, including Tracks Events.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants